package cn.stronglink.assetmanage.business.check.model;

import java.util.List;

import cn.stronglink.assetmanage.MyApplication;
import cn.stronglink.assetmanage.dao.AssetDao;
import cn.stronglink.assetmanage.dao.CheckDao;
import cn.stronglink.assetmanage.dao.DaoManager;
import cn.stronglink.assetmanage.entity.Asset;
import cn.stronglink.assetmanage.entity.Check;
import cn.stronglink.assetmanage.utils.Constants;

/**
 * 已经入库数据操作
 * Created by chencongcong on 2018/6/14.
 */

public class CheckedModel {

    //获取未入库表单 4为入库
    public List<Check> getDataByOrderNoDistince() {
        List<Check> checkList = DaoManager.
                getDaoSession(MyApplication.APP_CONTEXT).getCheckDao().queryBuilder().distinct()
                .orderDesc(CheckDao.Properties.CreateTime).
                        where(CheckDao.Properties.Status.eq(Constants.STATUS_FOUR)).list();
        DaoManager.getDaoSession(MyApplication.APP_CONTEXT).clear();
        if (checkList != null) {
            return checkList;
        }
        return null;
    }

}
